package com.serkol.exception;



import com.serkol.ams.bean.Result;
import com.serkol.constant.ResultConstant;

public class SerKolNullException extends NullPointerException {
    private static final long serialVersionUID = -6357149550353160810L;
    private Result error;

    public SerKolNullException() {
        super();

    }

    public SerKolNullException(String message) {
        super(message);
        this.error.setStatus(ResultConstant.FAIL);
        this.error.setMsg(message);
        //    this(Result.builder().errorCode(-1).errorMsg(message).build());
    }

    public SerKolNullException(int status) {
        super();
        this.error.setStatus(status);

        //    this(Result.builder().errorCode(-1).errorMsg(message).build());
    }

    public SerKolNullException(Result error) {
        super(error.toString());
        this.error = error;
    }



    public Result getError() {
        return this.error;
    }

}